import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

public class KeyWord {
    public static void main(String[] args) {
        //与方法的数量，变量类型，顺序有关   不可以
        //基本数据类型传递实参的方法是值传递，因此不会改变原有的值
//        getNumberPulst(3);
//        getNumberPostion(1200);
//        getNumberBoolean(120,45);
//        getNumberBoolean(120.8,45.9);
        getNumberBoolean(120.8,450.9,80.6);
    }
    //输出1+...的和
    public static void getNumberPulst(int number){
        int num=0;
        for (int i=0;i<=number;i++) {
            num+=i;
        }
        System.out.println(number+"累加的结果是"+num);
    }
    //输出数字有几位
    public static void getNumberPostion(int number){
        String str=number+"";
        System.out.println("此数字有"+str.toCharArray().length+"位");
    }

    public static void getNumberBoolean(int number1,int number2){
        System.out.println(number1>number2?number1:number2);
    }
    public static void getNumberBoolean(double number1,double number2){
        System.out.println(number1>number2?number1:number2);
    }
    public static void getNumberBoolean(double number1,double number2,double number3){
        System.out.println(number1>number2?number1>number3?number1:number3:number2>number3?number2:number3);
    }

}
